package com.xudu.tourbackend.controller;


import com.xudu.tourbackend.common.DeleteBatchRequest;
import com.xudu.tourbackend.common.Result;
import com.xudu.tourbackend.entity.request.AddScenicSpotRequest;
import com.xudu.tourbackend.entity.request.SearchScenicSpot;
import com.xudu.tourbackend.entity.request.UpdateScenicSpotRequest;
import com.xudu.tourbackend.entity.vo.ScenicSpotVo;
import io.swagger.annotations.ApiImplicitParam;
import org.springframework.web.bind.annotation.*;

import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xudu
 * @since 2024-06-17
 */

@RequestMapping("/scenic-spot")
public interface ScenicSpotController {

    /**
     * 添加景点
     * @param addScenicSpotRequest 添加景点请求体
     * @param request 请求
     * @return Result 添加景点id
     */
    @PostMapping("addScenicSpot")
    //@ApiImplicitParam(name = "addScenicSpotRequest", value = "添加景点请求体", required = true, dataTypeClass = MultipartFile.class)
    Result addScenicSpot(AddScenicSpotRequest addScenicSpotRequest, HttpServletRequest request);

    /**
     * 更新景点
     * @param updateScenicSpotRequest 更新景点请求体
     * @param request 请求
     * @return Result 更新景点是否成功
     */
    @PostMapping("updateScenicSpot")
    //@ApiImplicitParam(name = "updateScenicSpotRequest", value = "更新景点请求体", required = true, dataTypeClass = MultipartFile.class)
    Result updateScenicSpot(UpdateScenicSpotRequest updateScenicSpotRequest, HttpServletRequest request);

    /**
     * 删除景点
     * @param deleteBatchRequest 删除景点请求体
     * @param request 请求
     * @return Result 删除景点数量
     */
    @PostMapping("deleteScenicSpot")
    Result deleteScenicSpot(DeleteBatchRequest deleteBatchRequest, HttpServletRequest request);


    /**
     * 组合条件查询景点信息
     * @param searchScenicSpot 搜索景点请求体
     * @return Result 景点信息
     */
    @GetMapping("searchScenicSpot")
    Result searchScenicSpot(SearchScenicSpot searchScenicSpot);

    //todo分页查询

}
